Public Class settings Private Sub KryptonButton2_Click(sender As Object, e As EventArgs) Handles KryptonButton2.Click 'Close the settings dialog without saving the settings Me.Close() End Sub Private Sub settings_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'Loads the settings from My.Settings If My.Settings.hideExtra = False Then KryptonCheckBox1.Checked = False End If KryptonComboBox1.Text = My.Settings.alertName If My.Settings.keepCounting = True Then KryptonCheckBox2.Checked = True End If If My.Settings.autoTime = True Then KryptonCheckBox4.Checked = True End If If My.Settings.showLogDefault = True Then KryptonCheckBox3.Checked = True End If If My.Settings.startupMode = "c" Then KryptonComboBox2.Text = "Countdown" End If If My.Settings.startupMode = "s" Then KryptonComboBox2.Text = "Stopwatch" End If End Sub Private Sub KryptonButton1_Click(sender As Object, e As EventArgs) Handles KryptonButton1.Click 'Saves the settings then closes the settings dialog '1/10th Second Resolution If KryptonCheckBox1.Checked Then My.Settings.hideExtra = True If stopwatch.Label1.Text = "00:00:00.00000" Or stopwatch.Timer1.Enabled = False Then stopwatch.Label1.Text = "00:00:00.00" stopwatch.Label1.Left = (198.5) - (stopwatch.Label1.Width / 2) 'Center label in form End If If countdown.Label1.Text = "00:00:00.00000" Or countdown.Timer1.Enabled = False Then countdown.Label1.Text = "00:00:00.00" countdown.Label1.Left = (198.5) - (countdown.Label1.Width / 2) 'Center label in form End If Else My.Settings.hideExtra = False If stopwatch.Label1.Text = "00:00:00.00" Or stopwatch.Timer1.Enabled = False Then stopwatch.Label1.Text = "00:00:00.00000" stopwatch.Label1.Left = (198.5) - (stopwatch.Label1.Width / 2) 'Center label in form End If If countdown.Label1.Text = "00:00:00.00" Or countdown.Timer1.Enabled = False Then countdown.Label1.Text = "00:00:00.00000" countdown.Label1.Left = (198.5) - (countdown.Label1.Width / 2) 'Center label in form End If End If 'Alert If Not My.Settings.alertName = KryptonComboBox1.Text Then My.Settings.alertName = KryptonComboBox1.Text End If 'Keep Counting after Alert If KryptonCheckBox2.Checked Then My.Settings.keepCounting = True Else My.Settings.keepCounting = False End If 'Automatically start timing If KryptonCheckBox4.Checked Then My.Settings.autoTime = True Else My.Settings.autoTime = False End If 'Automatically show log If KryptonCheckBox3.Checked Then My.Settings.showLogDefault = True Else My.Settings.showLogDefault = False End If 'Startup mode If KryptonComboBox2.Text = "Stopwatch" Then My.Settings.startupMode = "s" End If If KryptonComboBox2.Text = "Countdown" Then My.Settings.startupMode = "c" End If My.Settings.Save() Me.Close() End Sub Private Sub KryptonButton3_Click(sender As Object, e As EventArgs) Handles KryptonButton3.Click 'Tests the selected sound Dim Sound As New System.Media.SoundPlayer() If KryptonComboBox1.Text = "Horn" Then Sound.Stream = My.Resources.horn ElseIf KryptonComboBox1.Text = "Morning" Then Sound.Stream = My.Resources.morning ElseIf KryptonComboBox1.Text = "Tinkle" Then Sound.Stream = My.Resources.tinkle End If Sound.Load() Sound.Play() End Sub Private Sub KryptonButton4_Click(sender As Object, e As EventArgs) Handles KryptonButton4.Click 'Set the Log ID to 0 My.Settings.logID = 0 My.Settings.countdownLogID = 0 End Sub Private Sub KryptonButton5_Click(sender As Object, e As EventArgs) Handles KryptonButton5.Click Process.Start("https://etechtimer.codeplex.com/wikipage?title=Acceptable%20Input%20Formats") End Sub End Class